home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / p_man / cat3 / librw / RWTPtrHashMap.z / RWTPtrHashMap
Text File  |  1998-10-30  |  26KB  |  661 lines

  1.  
  2.  
  3.  
  4. RRRRWWWWTTTTPPPPttttrrrrHHHHaaaasssshhhhMMMMaaaapppp((((3333CCCC++++++++))))                                        RRRRWWWWTTTTPPPPttttrrrrHHHHaaaasssshhhhMMMMaaaapppp((((3333CCCC++++++++))))
  5.  
  6.  
  7.  
  8. NNNNaaaammmmeeee
  9.      RWTPtrHashMap<K,T,H,EQ> - Rogue Wave library class
  10.  
  11. SSSSyyyynnnnooooppppssssiiiissss
  12.               #include <rw/tphdict.h>
  13.           RWTPtrHashMap<K,T,H,EQ> m;
  14.  
  15.  
  16.  
  17. PPPPlllleeeeaaaasssseeee NNNNooootttteeee!!!!
  18.  
  19.  
  20.  
  21.      IIIIffff yyyyoooouuuu hhhhaaaavvvveeee tttthhhheeee SSSSttttaaaannnnddddaaaarrrrdddd CCCC++++++++ LLLLiiiibbbbrrrraaaarrrryyyy,,,, uuuusssseeee tttthhhheeee iiiinnnntttteeeerrrrffffaaaacccceeee ddddeeeessssccccrrrriiiibbbbeeeedddd hhhheeeerrrreeee....
  22.      OOOOtttthhhheeeerrrrwwwwiiiisssseeee,,,, uuuusssseeee tttthhhheeee iiiinnnntttteeeerrrrffffaaaacccceeee ffffoooorrrr RRRRWWWWTTTTPPPPttttrrrrHHHHaaaasssshhhhDDDDiiiiccccttttiiiioooonnnnaaaarrrryyyy described in
  23.      Appendix A.
  24.  
  25.  
  26. DDDDeeeessssccccrrrriiiippppttttiiiioooonnnn
  27.      This class maintains a pointer-based collection of associations of type
  28.      ppppaaaaiiiirrrr<<<<KKKK**** ccccoooonnnnsssstttt,,,, TTTT****>>>>.  These pairs are stored according to a hash object of
  29.      type HHHH.  HHHH must provide a hash function on elements of type KKKK via a
  30.      public member
  31.  
  32.                    unsigned long operator()(const K& x)
  33.  
  34.  
  35.  
  36.  
  37.  
  38.      Equivalent keys within the collection will be grouped together based on
  39.      an equality object of type EEEEQQQQ.  EEEEQQQQ must ensure this grouping via public
  40.      member
  41.  
  42.                    bool operator()(const K& x, const K& y)
  43.  
  44.  
  45.  
  46.  
  47.  
  48.      which should return ttttrrrruuuueeee if xxxx and yyyy are equivalent.
  49.      RRRRWWWWTTTTPPPPttttrrrrHHHHaaaasssshhhhMMMMaaaapppp<<<<KKKK,,,,TTTT,,,,HHHH,,,,EEEEQQQQ>>>> will not accept a key that compares equal to any
  50.      key already in the collection.  (RRRRWWWWTTTTPPPPttttrrrrHHHHaaaasssshhhhMMMMuuuullllttttiiiiMMMMaaaapppp<<<<KKKK,,,,TTTT,,,,HHHH,,,,EEEEQQQQ>>>> may contain
  51.      multiple keys that compare equal to each other.)  Equality is based on
  52.      the comparison object and not on the ======== operator.
  53.  
  54. PPPPeeeerrrrssssiiiisssstttteeeennnncccceeee
  55.      Isomorphic
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. RRRRWWWWTTTTPPPPttttrrrrHHHHaaaasssshhhhMMMMaaaapppp((((3333CCCC++++++++))))                                        RRRRWWWWTTTTPPPPttttrrrrHHHHaaaasssshhhhMMMMaaaapppp((((3333CCCC++++++++))))
  71.  
  72.  
  73.  
  74. Examples
  75.               //
  76.  
  77.  
  78.  
  79.               // tphmap.cpp
  80.           //
  81.           #include<rw/tphdict.h>
  82.           #include<rw/cstring.h>
  83.           #include<iostream.h>
  84.           struct silly_hash{
  85.              unsigned long operator()(RWCString x) const
  86.              { return x.length() * (long)x(0); }
  87.           };
  88.           int main(){
  89.              RWCString snd = "Second";
  90.              RWTPtrHashMap<RWCString,int,silly_hash,equal_to<RWCString> >
  91.                  contest;
  92.              contest.insert(new RWCString("First"), new int(7));
  93.              contest.insert(&snd,new int(3));
  94.              //duplicate insertion rejected
  95.              contest.insert(&snd,new int(6));
  96.  
  97.  
  98.                  contest.insert(new RWCString("Third"), new int(2));
  99.              cout << "There was "
  100.  
  101.  
  102.  
  103.                       << contest.occurrencesOf(new RWCString("Second"))
  104.                   << " second place winner." << endl;
  105.  
  106.  
  107.                  return 0;
  108.  
  109.  
  110.  
  111.               }
  112.            Program Output:
  113.           There was 1 second place winner.
  114.  
  115. RRRReeeellllaaaatttteeeedddd CCCCllllaaaasssssssseeeessss
  116.      Class RRRRWWWWTTTTPPPPttttrrrrHHHHaaaasssshhhhMMMMuuuullllttttiiiiMMMMaaaapppp<<<<KKKK,,,,TTTT,,,,HHHH,,,,EEEEQQQQ>>>>  offers the same interface to a
  117.      pointer-based collection that accepts multiple keys that compare equal to
  118.      each other.  Class
  119.      rrrrwwww____hhhhaaaasssshhhhmmmmaaaapppp<<<<KKKK****,,,,TTTT****,rrrrwwww____ddddeeeerrrreeeeffff____hhhhaaaasssshhhh<<<<HHHH,,,,KKKK>>>>,rrrrwwww____ddddeeeerrrreeeeffff____ccccoooommmmppppaaaarrrreeee<<<<CCCC,,,,KKKK>>>> >>>> is the C++-
  120.      standard library style collection that serves as the underlying
  121.      implementation for this collection.
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. RRRRWWWWTTTTPPPPttttrrrrHHHHaaaasssshhhhMMMMaaaapppp((((3333CCCC++++++++))))                                        RRRRWWWWTTTTPPPPttttrrrrHHHHaaaasssshhhhMMMMaaaapppp((((3333CCCC++++++++))))
  137.  
  138.  
  139.  
  140. Public Typedefs
  141.               typedef rw_deref_hash<H,K>                container_hash;
  142.           typedef rw_deref_compare<EQ,K>            container_eq;
  143.           typedef rw_hashmap<K*,T*,container_hash,container_eq >
  144.                                                     container_type;
  145.           typedef container_type::size_type         size_type;
  146.           typedef container_type::difference_type   difference_type;
  147.           typedef container_type::iterator          iterator;
  148.           typedef container_type::const_iterator    const_iterator;
  149.           typedef pair <K* const, T*>               value_type;
  150.           typedef pair <K* const, T*>&              reference;
  151.           typedef const pair <K* const, T*>&        const_reference;
  152.           typedef K*                                value_type_key;
  153.           typedef T*                                value_type_data;
  154.           typedef K*&                               reference_key;
  155.           typedef T*&                               reference_data;
  156.           typedef const K*const&                    const_reference_key;
  157.           typedef const T*const&                    const_reference_data;
  158.  
  159.  
  160.  
  161. PPPPuuuubbbblllliiiicccc CCCCoooonnnnssssttttrrrruuuuccccttttoooorrrrssss
  162.               RRRRWWWWTTTTPPPPttttrrrrHHHHaaaasssshhhhMMMMaaaapppp<<<<KKKK,,,,TTTT,,,,HHHH,,,,EEEEQQQQ>>>>();
  163.  
  164.  
  165.      Constructs an empty map.
  166.  
  167.               RRRRWWWWTTTTPPPPttttrrrrHHHHaaaasssshhhhMMMMaaaapppp<<<<KKKK,,,,TTTT,,,,HHHH,,,,EEEEQQQQ>>>>(const RWTPtrHashMap<K,T,H,EQ>& rwm);
  168.  
  169.  
  170.      Copy constructor.
  171.  
  172.               RRRRWWWWTTTTPPPPttttrrrrHHHHaaaasssshhhhMMMMaaaapppp<<<<KKKK,,,,TTTT,,,,HHHH,,,,EEEEQQQQ>>>>
  173.           (const container_type & m);
  174.  
  175.  
  176.      Constructs a pointer based hash map by copying all elements from mmmm.
  177.  
  178.               RRRRWWWWTTTTPPPPttttrrrrHHHHaaaasssshhhhMMMMaaaapppp<<<<KKKK,,,,TTTT,,,,HHHH,,,,EEEEQQQQ>>>>
  179.           (const H& h, size_type sz = RWDEFAULT_CAPACITY);
  180.  
  181.  
  182.      This TTTToooooooollllssss....hhhh++++++++ 6.x style constructor creates an empty hashed map which
  183.      uses the hash object hhhh and has an initial capacity of sssszzzz.
  184.  
  185.               RRRRWWWWTTTTPPPPttttrrrrHHHHaaaasssshhhhMMMMaaaapppp<<<<KKKK,,,,TTTT,,,,HHHH,,,,EEEEQQQQ>>>>
  186.           (const value_type* first,value_type* last);
  187.  
  188.  
  189.      Constructs a map by copying elements from the array of ppppaaaaiiiirrrrs pointed to
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. RRRRWWWWTTTTPPPPttttrrrrHHHHaaaasssshhhhMMMMaaaapppp((((3333CCCC++++++++))))                                        RRRRWWWWTTTTPPPPttttrrrrHHHHaaaasssshhhhMMMMaaaapppp((((3333CCCC++++++++))))
  203.  
  204.  
  205.  
  206.      by ffffiiiirrrrsssstttt, up to, but not including, the pair pointed to by llllaaaasssstttt.
  207.  
  208. PPPPuuuubbbblllliiiicccc MMMMeeeemmmmbbbbeeeerrrr OOOOppppeeeerrrraaaattttoooorrrrssss
  209.               RWTPtrHashMap<K,T,H,EQ>&
  210.           ooooppppeeeerrrraaaattttoooorrrr====(const container_type& m);
  211.           RWTPtrHashMap<K,T,H,EQ>&
  212.           ooooppppeeeerrrraaaattttoooorrrr====(const RWTPtrHashMap<K,T,H,EQ>& m);
  213.  
  214.  
  215.      Destroys all associations in self and replaces them by copying all
  216.      associations from mmmm.
  217.  
  218.               bool
  219.           ooooppppeeeerrrraaaattttoooorrrr========(const RWTPtrHashMap<K,T,H,EQ>& m) const;
  220.  
  221.  
  222.      Returns ttttrrrruuuueeee if self compares equal to mmmm, otherwise returns ffffaaaallllsssseeee.  Two
  223.      collections are equal if both have the same number of entries, and
  224.      iterating through both collections produces, in turn, individual keys
  225.      that compare equal to each other.  Keys are dereferenced before being
  226.      compared.
  227.  
  228.               T*&
  229.           ooooppppeeeerrrraaaattttoooorrrr[[[[]]]](K* key);
  230.  
  231.  
  232.      Looks up kkkkeeeeyyyy and returns a reference to its associated item.  If the key
  233.      is not in the dictionary, then it will be added with an associated
  234.      uninitialized pointer of type TTTT****.  Because of this, if there is a
  235.      possibility that a key will not be in the dictionary, then this operator
  236.      should only be used as an lvalue.
  237.  
  238. PPPPuuuubbbblllliiiicccc MMMMeeeemmmmbbbbeeeerrrr FFFFuuuunnnnccccttttiiiioooonnnnssss
  239.               void
  240.           aaaappppppppllllyyyy(void (*fn)(const K*, T*&,void*),void* d);
  241.           void
  242.           aaaappppppppllllyyyy(void (*fn)(const K*,const T*,void*),void* d) const;
  243.  
  244.  
  245.      Applies the user-defined function pointed to by ffffnnnn to every association
  246.      in the collection.  self function must have one of the prototypes:
  247.  
  248.               void yourfun(const K* key, T*& a, void* d);
  249.  
  250.  
  251.  
  252.               void yourfun(const K* key, const T* a, void* d);
  253.  
  254.  
  255.      Client data may be passed through parameter dddd.
  256.  
  257.  
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. RRRRWWWWTTTTPPPPttttrrrrHHHHaaaasssshhhhMMMMaaaapppp((((3333CCCC++++++++))))                                        RRRRWWWWTTTTPPPPttttrrrrHHHHaaaasssshhhhMMMMaaaapppp((((3333CCCC++++++++))))
  269.  
  270.  
  271.  
  272.               void
  273.           aaaappppppppllllyyyyTTTTooooKKKKeeeeyyyyAAAAnnnnddddVVVVaaaalllluuuueeee(void (*fn)(const K*, T*&,void*),void* d);
  274.           void
  275.           aaaappppppppllllyyyyTTTTooooKKKKeeeeyyyyAAAAnnnnddddVVVVaaaalllluuuueeee
  276.           (void (*fn)(const K*, const T*, void*), void* d) const;
  277.  
  278.  
  279.      This is a deprecated version of the aaaappppppppllllyyyy member above.  It behaves
  280.      exactly the same as aaaappppppppllllyyyy.
  281.  
  282.               iterator
  283.           bbbbeeeeggggiiiinnnn();
  284.           const_iterator
  285.           bbbbeeeeggggiiiinnnn() const;
  286.  
  287.  
  288.      Returns an iterator positioned at the first pair in self.
  289.  
  290.               size_type
  291.           ccccaaaappppaaaacccciiiittttyyyy() const;
  292.  
  293.  
  294.      Returns the number of buckets(slots) available in the underlying hash
  295.      representation.  See rrrreeeessssiiiizzzzeeee below.
  296.  
  297.               void
  298.           cccclllleeeeaaaarrrr();
  299.  
  300.  
  301.      Clears the collection by removing all items from self.
  302.  
  303.               void
  304.           cccclllleeeeaaaarrrrAAAAnnnnddddDDDDeeeessssttttrrrrooooyyyy();
  305.  
  306.  
  307.      Removes all associations from the collection and uses ooooppppeeeerrrraaaattttoooorrrr ddddeeeelllleeeetttteeee to
  308.      destroy the objects pointed to by the keys and their associated items.
  309.      Do not use self method if multiple pointers to the same object are
  310.      stored.  (If the equality operator is reflexive, the container cannot
  311.      hold such multiple pointers.)
  312.  
  313.               bool
  314.           ccccoooonnnnttttaaaaiiiinnnnssss(const K* key) const;
  315.  
  316.  
  317.      Returns ttttrrrruuuueeee if there exists a key jjjj in self that  compares equal to
  318.      ****kkkkeeeeyyyy, otherwise returns ffffaaaallllsssseeee.
  319.  
  320.               bool
  321.           ccccoooonnnnttttaaaaiiiinnnnssss
  322.           ((((bbbboooooooollll ((((****ffffnnnn))))((((vvvvaaaalllluuuueeee____ttttyyyyppppeeee,,,,vvvvooooiiiidddd****)))),,,,vvvvooooiiiidddd**** dddd)))) ccccoooonnnnsssstttt;;;;
  323.  
  324.  
  325.  
  326.  
  327.                                                                         PPPPaaaaggggeeee 5555
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334. RRRRWWWWTTTTPPPPttttrrrrHHHHaaaasssshhhhMMMMaaaapppp((((3333CCCC++++++++))))                                        RRRRWWWWTTTTPPPPttttrrrrHHHHaaaasssshhhhMMMMaaaapppp((((3333CCCC++++++++))))
  335.  
  336.  
  337.  
  338.      Returns ttttrrrruuuueeee if there exists an association a in self such that the
  339.      expression ((((((((****ffffnnnn))))((((aaaa,,,,dddd)))))))) is ttttrrrruuuueeee, otherwise returns ffffaaaallllsssseeee.  ffffnnnn points to a
  340.      user-defined tester function which must have prototype:
  341.  
  342.                  bool yourTester(value_type a, void* d);
  343.  
  344.  
  345.  
  346.  
  347.  
  348.      Client data may be passed through parameter dddd.
  349.  
  350.               iterator
  351.           eeeennnndddd();
  352.           const_iterator
  353.           eeeennnndddd() const;
  354.  
  355.  
  356.      Returns an iterator positioned "just past" the last association in self.
  357.  
  358.               size_type
  359.           eeeennnnttttrrrriiiieeeessss() const;
  360.  
  361.  
  362.      Returns the number of associations in self.
  363.  
  364.               float
  365.           ffffiiiillllllllRRRRaaaattttiiiioooo() const;
  366.  
  367.  
  368.      Returns the ratio eeeennnnttttrrrriiiieeeessss(((())))/ccccaaaappppaaaacccciiiittttyyyy(((()))).
  369.  
  370.               const K*
  371.           ffffiiiinnnndddd(const K* key) const;
  372.  
  373.  
  374.      If there exists a key jjjj in self that compares equal to ****kkkkeeeeyyyy,  then jjjj is
  375.      returned.  Otherwise, returns rrrrwwwwnnnniiiillll.
  376.  
  377.               value_type
  378.           ffffiiiinnnndddd(bool (*fn)(value_type,void*), void* d) const;
  379.  
  380.  
  381.      If there exists an association aaaa in self such that the expression
  382.      ((((((((****ffffnnnn))))((((aaaa,,,,dddd)))))))) is ttttrrrruuuueeee, then returns aaaa.  Otherwise, returns
  383.      ppppaaaaiiiirrrr<<<<rrrrwwwwnnnniiiillll,,,,rrrrwwwwnnnniiiillll>>>>.  ffffnnnn points to a user-defined tester function which
  384.      must have prototype:
  385.  
  386.                  bool yourTester(value_type a, void* d);
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.                                                                         PPPPaaaaggggeeee 6666
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400. RRRRWWWWTTTTPPPPttttrrrrHHHHaaaasssshhhhMMMMaaaapppp((((3333CCCC++++++++))))                                        RRRRWWWWTTTTPPPPttttrrrrHHHHaaaasssshhhhMMMMaaaapppp((((3333CCCC++++++++))))
  401.  
  402.  
  403.  
  404.  
  405.  
  406.      Client data may be passed through parameter dddd.
  407.  
  408.               T*
  409.           ffffiiiinnnnddddVVVVaaaalllluuuueeee(const K* key);
  410.           const T*
  411.           ffffiiiinnnnddddVVVVaaaalllluuuueeee(const K* key) const;
  412.  
  413.  
  414.      If there exists a key jjjj in self that compares equal to ****kkkkeeeeyyyy, returns the
  415.      item associated with jjjj.  Otherwise, returns rrrrwwwwnnnniiiillll.
  416.  
  417.               const K*
  418.           ffffiiiinnnnddddKKKKeeeeyyyyAAAAnnnnddddVVVVaaaalllluuuueeee(const K* key, T*& tr);
  419.           const K*
  420.           ffffiiiinnnnddddKKKKeeeeyyyyAAAAnnnnddddVVVVaaaalllluuuueeee(const K* key, const T*& tr) const;
  421.  
  422.  
  423.      If there exists a key jjjj in self that compares equal to ****kkkkeeeeyyyy, assigns the
  424.      item associated with jjjj to trrrr,,,, and returns jjjj.  Otherwise, returns rrrrwwwwnnnniiiillll
  425.      and leaves the value of ttttrrrr unchanged.
  426.  
  427.               bool
  428.           iiiinnnnsssseeeerrrrtttt(K* key, T* a);
  429.  
  430.  
  431.      Adds kkkkeeeeyyyy with associated item aaaa to the collection.  Returns ttttrrrruuuueeee if the
  432.      insertion is successful, otherwise returns ffffaaaallllsssseeee.  The function will
  433.      return ttttrrrruuuueeee unless the collection already holds an association with the
  434.      equivalent key.
  435.  
  436.               bool
  437.           iiiinnnnsssseeeerrrrttttKKKKeeeeyyyyAAAAnnnnddddVVVVaaaalllluuuueeee(K* key,T* a);
  438.  
  439.  
  440.      This is a deprecated version of the iiiinnnnsssseeeerrrrtttt member above.  It behaves
  441.      exactly the same as iiiinnnnsssseeeerrrrtttt.
  442.  
  443.               bool
  444.           iiiissssEEEEmmmmppppttttyyyy() const;
  445.  
  446.  
  447.      Returns ttttrrrruuuueeee if there are no items in the collection, ffffaaaallllsssseeee otherwise.
  448.  
  449.               size_type
  450.           ooooccccccccuuuurrrrrrrreeeennnncccceeeessssOOOOffff(const K* key) const;
  451.  
  452.  
  453.      Returns the number of keys jjjj in self that compare equal to ****kkkkeeeeyyyy.
  454.  
  455.  
  456.  
  457.  
  458.  
  459.                                                                         PPPPaaaaggggeeee 7777
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466. RRRRWWWWTTTTPPPPttttrrrrHHHHaaaasssshhhhMMMMaaaapppp((((3333CCCC++++++++))))                                        RRRRWWWWTTTTPPPPttttrrrrHHHHaaaasssshhhhMMMMaaaapppp((((3333CCCC++++++++))))
  467.  
  468.  
  469.  
  470.               size_type
  471.           ooooccccccccuuuurrrrrrrreeeennnncccceeeessssOOOOffff
  472.           (bool (*fn)(value_type,void*),void* d) const;
  473.  
  474.  
  475.      Returns the number of associations aaaa in self such that the
  476.      expression((((((((****ffffnnnn))))((((aaaa,,,,dddd)))))))) is ttttrrrruuuueeee.   ffffnnnn points to a user-defined tester
  477.      function which must have prototype:
  478.  
  479.               bool yourTester(value_type a, void* d);
  480.  
  481.  
  482.  
  483.  
  484.  
  485.      Client data may be passed through parameter dddd....
  486.  
  487.               K*
  488.           rrrreeeemmmmoooovvvveeee(const K* key);
  489.  
  490.  
  491.      Removes the first association with key jjjj in self that compares equal to
  492.      ****kkkkeeeeyyyy and returns jjjj.  Returns rrrrwwwwnnnniiiillll if there is no such association.
  493.  
  494.               K*
  495.           rrrreeeemmmmoooovvvveeee(bool (*fn)(value_type,void*), void* d);
  496.  
  497.  
  498.      Removes the first association aaaa in self such that the expression
  499.      ((((((((****ffffnnnn))))((((aaaa,,,,dddd)))))))) is ttttrrrruuuueeee and returns its key.  Returns rrrrwwwwnnnniiiillll if there is no
  500.      such association.  ffffnnnn points to a user-defined tester function which must
  501.      have prototype:
  502.  
  503.               bool yourTester(value_type a, void* d);
  504.  
  505.  
  506.  
  507.  
  508.  
  509.      Client data may be passed through parameter dddd.
  510.  
  511.               size_type
  512.           rrrreeeemmmmoooovvvveeeeAAAAllllllll(const K* key);
  513.  
  514.  
  515.      Removes all associations with key jjjj in self that compare equal to ****kkkkeeeeyyyy.
  516.      Returns the number of associations removed.
  517.  
  518.               size_type
  519.           rrrreeeemmmmoooovvvveeeeAAAAllllllll(bool (*fn)(value_type,void*), void* d);
  520.  
  521.  
  522.  
  523.  
  524.  
  525.                                                                         PPPPaaaaggggeeee 8888
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532. RRRRWWWWTTTTPPPPttttrrrrHHHHaaaasssshhhhMMMMaaaapppp((((3333CCCC++++++++))))                                        RRRRWWWWTTTTPPPPttttrrrrHHHHaaaasssshhhhMMMMaaaapppp((((3333CCCC++++++++))))
  533.  
  534.  
  535.  
  536.      Removes all associations aaaa in self such that the expression
  537.      ((((((((****ffffnnnn))))((((aaaa,,,,dddd))))))))is ttttrrrruuuueeee.  Returns the number removed.  ffffnnnn points to a user-
  538.      defined tester function which must have prototype:
  539.  
  540.                  bool yourTester(value_type a, void* d);
  541.  
  542.  
  543.  
  544.  
  545.  
  546.      Client data may be passed through parameter dddd.
  547.  
  548.               void
  549.           rrrreeeessssiiiizzzzeeee(size_type sz);
  550.  
  551.  
  552.      Changes the capacity of self by creating a new hashed map with a capacity
  553.      of  sssszzzz .  rrrreeeessssiiiizzzzeeee copies every element of self into the new container and
  554.      finally swaps the internal representation of the new container with the
  555.      internal representation of sssseeeellllffff.
  556.  
  557.               rw_hashmap<K*,T*,rw_deref_hash<H,K>,deref_compare<EQ,K>>&
  558.           ssssttttdddd();
  559.           const rw_hashmap<K*,T*,rw_deref_hash<H,K>,deref_compare<EQ,K>>&
  560.           ssssttttdddd() const;
  561.  
  562.  
  563.      Returns a reference to the underlying C++-standard collection that serves
  564.      as the implementation for self.
  565.  
  566. RRRReeeellllaaaatttteeeedddd GGGGlllloooobbbbaaaallll OOOOppppeeeerrrraaaattttoooorrrrssss
  567.               RWvostream&
  568.           ooooppppeeeerrrraaaattttoooorrrr<<<<<<<<(RWvostream& strm,
  569.                      const RWTPtrHashMap<K,T,H,EQ>& coll);
  570.           RWFile&
  571.           ooooppppeeeerrrraaaattttoooorrrr<<<<<<<<(RWFile& strm, const RWTPtrHashMap<K,T,H,EQ>& coll);
  572.  
  573.  
  574.      Saves the collection ccccoooollllllll onto the output stream ssssttttrrrrmmmm, or a reference to
  575.      it if it has already been saved.
  576.  
  577.               RWvistream&
  578.           ooooppppeeeerrrraaaattttoooorrrr>>>>>>>>(RWvistream& strm, RWTPtrHashMap<K,T,H,EQ>& coll);
  579.           RWFile&
  580.           ooooppppeeeerrrraaaattttoooorrrr>>>>>>>>(RWFile& strm, RWTPtrHashMap<K,T,H,EQ>& coll);
  581.  
  582.  
  583.      Restores the contents of the collection ccccoooollllllll from the input stream ssssttttrrrrmmmm.
  584.  
  585.               RWvistream&
  586.           ooooppppeeeerrrraaaattttoooorrrr>>>>>>>>(RWvistream& strm, RWTPtrHashMap<K,T,H,EQ>*& p);
  587.           RWFile&
  588.  
  589.  
  590.  
  591.                                                                         PPPPaaaaggggeeee 9999
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598. RRRRWWWWTTTTPPPPttttrrrrHHHHaaaasssshhhhMMMMaaaapppp((((3333CCCC++++++++))))                                        RRRRWWWWTTTTPPPPttttrrrrHHHHaaaasssshhhhMMMMaaaapppp((((3333CCCC++++++++))))
  599.  
  600.  
  601.  
  602.           ooooppppeeeerrrraaaattttoooorrrr>>>>>>>>(RWFile& strm, RWTPtrHashMap<K,T,H,EQ>*& p);
  603.  
  604.  
  605.      Looks at the next object on the input stream ssssttttrrrrmmmm and either creates a
  606.      new collection off the heap and sets pppp to point to it, or sets pppp to point
  607.      to a previously read instance.  If a collection is created off the heap,
  608.      then you are responsible for deleting it.
  609.  
  610.  
  611.  
  612.  
  613.  
  614.  
  615.  
  616.  
  617.  
  618.  
  619.  
  620.  
  621.  
  622.  
  623.  
  624.  
  625.  
  626.  
  627.  
  628.  
  629.  
  630.  
  631.  
  632.  
  633.  
  634.  
  635.  
  636.  
  637.  
  638.  
  639.  
  640.  
  641.  
  642.  
  643.  
  644.  
  645.  
  646.  
  647.  
  648.  
  649.  
  650.  
  651.  
  652.  
  653.  
  654.  
  655.  
  656.  
  657.                                                                        PPPPaaaaggggeeee 11110000
  658.  
  659.  
  660.  
  661.